LOCAL_PATH:=$(call my-dir)

# Link to libX11
include $(CLEAR_VARS)
LOCAL_MODULE := libX11
LOCAL_SRC_FILES := ../../$(LOCAL_MODULE)/libs/$(TARGET_ARCH_ABI)/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../$(LOCAL_MODULE)/include
include $(PREBUILT_SHARED_LIBRARY)

# Link to libXt
include $(CLEAR_VARS)
LOCAL_MODULE := libXt
LOCAL_SRC_FILES := ../../$(LOCAL_MODULE)/libs/$(TARGET_ARCH_ABI)/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../$(LOCAL_MODULE)/include
include $(PREBUILT_SHARED_LIBRARY)

# Link to libXext
include $(CLEAR_VARS)
LOCAL_MODULE := libXext
LOCAL_SRC_FILES := ../../$(LOCAL_MODULE)/libs/$(TARGET_ARCH_ABI)/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../$(LOCAL_MODULE)/include
include $(PREBUILT_SHARED_LIBRARY)

# Now compile the stuff
include $(CLEAR_VARS)

LOCAL_MODULE:=libXmu

libXmuu_la_SOURCES = \
	ClientWin.c \
	CursorName.c \
	DefErrMsg.c \
	GetHost.c \
	Lower.c

LOCAL_SRC_FILES := \
	$(libXmuu_la_SOURCES) \
	AllCmap.c \
	Atoms.c \
	Clip.c \
	CloseHook.c \
	CmapAlloc.c \
	CrCmap.c \
	CrPixFBit.c \
	CvtCache.c \
	CvtStdSel.c \
	DelCmap.c \
	DisplayQue.c \
	Distinct.c \
	DrawLogo.c \
	DrRndRect.c \
	EditresCom.c \
	ExtAgent.c \
	FToCback.c \
	GrayPixmap.c \
	Initer.c \
	LocBitmap.c \
	Lookup.c \
	LookupCmap.c \
	RdBitF.c \
	ScrOfWin.c \
	ShapeWidg.c \
	StdCmap.c \
	StrToBS.c \
	StrToBmap.c \
	StrToCurs.c \
	StrToGrav.c \
	StrToJust.c \
	StrToLong.c \
	StrToOrnt.c \
	StrToShap.c \
	StrToWidg.c \
	UpdMapHint.c \
	VisCmap.c \
	WidgetNode.c \
	Xct.c \
	sharedlib.c

LOCAL_SHARED_LIBRARIES:=\
	libX11 libXt libXext

include ../libX11/libX11.mk

LOCAL_C_INCLUDES += \
	include/X11/Xmu \
	../libSM/include \
	../libICE/include

include $(BUILD_SHARED_LIBRARY)
